import request from "@/utils/request";

function login(params) {
    return request({
        url: '/user/login',
        method: 'post',
        data: params
    })
}

function register(params) {
    return request({
        url: '/user/register',
        method: 'post',
        data: params
    })
}

// 获取当前用户信息
function getUserInfo(params) {
    return request({
        url: '/user/info',
        method: 'post',
        data: params
    })
}

function updateUserInfo(params) {
    return request({
        url: '/user',
        method: 'post',
        data: params
    })
}

export default {
    login, register, getUserInfo, updateUserInfo
}